package com.wheel.autoconfigure.shiro.authorizing;

import java.util.List;

/**
 * {@code SecurityDao}
 *
 * @author WangNaiFei, wangnaifei@163.com
 * @version 1.0
 * @Description: 鉴权dao接口
 * <p>
 * @date 2017年10月31日 上午10:33:05
 * @since jdk1.7+
 */
public interface AuthorizingDao {

    String CacheNameOfDataPerm = "securityDataPerm";
    String CacheNameOfUserPermissions = "UserPermissions";
    String CacheNameOfUserRoles = "UserRoles";

    /**
     * <dt>Description:getUser4LoginByUserId</dt>
     * <dd>查询用户byUserid</dd>
     * <dd>author: wangnaifei@163.com</dd>
     * <dd>version:1.0 <i>2020/5/13 16:17</i></dd>
     *
     * @param userId
     * @return UsernamePasswordAuthenticationInfo
     * @since jdk1.7+
     */
    UsernamePasswordAuthenticationInfo getUser4LoginByUserId(String userId);

    /**
     * <dt>Description:selectUserRoles</dt>
     * <dd>查询用户角色</dd>
     * <dd>author: wangnaifei@163.com</dd>
     * <dd>version:1.0 <i>2020/5/13 16:17</i></dd>
     *
     * @param userId
     * @return java.util.List<java.lang.String>
     * @since jdk1.7+
     */
    List<String> selectUserRoles(String userId);


    /**
     * <dt>Description:selectUserPermissions</dt>
     * <dd>查询用户功能权限列表</dd>
     * <dd>author: wangnaifei@163.com</dd>
     * <dd>version:1.0 <i>2020/5/13 16:17</i></dd>
     *
     * @param userId
     * @return java.util.List<java.lang.String>
     * @since jdk1.7+
     */
    List<String> selectUserPermissions(String userId);

}
